package cn.com.dycc.sys_manage.menusysmanagement.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import cn.com.dycc.sys_manage.menusysmanagement.entity.Menu;
import cn.com.dycc.sys_manage.menusysmanagement.entity.MenuResult;
import cn.com.dycc.sys_manage.menusysmanagement.entity.MenuResultList;
import cn.com.dycc.sys_manage.menusysmanagement.param.MenuListParam;
import cn.com.dycc.sys_manage.rolesysmanagement.service.RoleNotFoundException;





/**
 * 
 * Description:菜单的业务层接口
 * Author: linfangan
 * Version: 1.0
 * Create Date Time: 2017年8月9日 上午9:46:56.
 * Update Date Time: 
 * @see
 */
public interface MenuService {
	
	/**
	 * 新增菜单
	 * @param menu 新增的菜单信息 ；userId 用户id
	 * @return 插入成功！ 插入失败！
	 * @throws MenuNotFoundException
	 */
	public String addMenu(HttpServletRequest request,Menu menu)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 查询所有的菜单信息，树状
	 * @param userId 用户id
	 * @return List 所有菜单的信息集合
	 */
	public List<Object> findAllMenu(HttpServletRequest request,String sys_flag)throws MenuNotFoundException,RoleNotFoundException;
	/**
	 * 删除选定的菜单信息
	 * @param menuNo userId
	 * @return
	 * @throws MenuNotFoundException
	 */
	public boolean deleteMenuByMenuNo(String menuNo) throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 根据菜单id查询菜单信息
	 * @param menuNo 菜单id userId 用户id
	 * @return 查询到的Menu菜单数据
	 * @throws MenuNotFoundException
	 */
	public MenuResult queryTheMenubyMenuId(String menuNo) throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 根据菜单id更新菜单信息
	 * @param menu 需要更新的菜单信息 userId 用户id
	 * @return 更新后的菜单信息
	 * @throws MenuNotFoundException
	 */
	public String updateMenuByMenuNo(HttpServletRequest request,Menu menu)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 根据用户id查询用户菜单的信息，用于用户的菜单的显示 pc ,手机 ，微信
	 * @param  user_id 角色菜单
	 * @param  sys_flag 终端标识码
	 * @return 
	 * @throws MenuNotFoundException
	 */
	public List<Object> findMenuInfoByMap(HttpServletRequest request,String sys_flag)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 查询所有的菜单信息
	 * @param bindRoleNo
	 * @return
	 * @throws MenuNotFoundException
	 * @throws RoleNotFoundException
	 */
	public List<Map<String,Object>> selectAllMenuByTopDeptNo(HttpServletRequest request,String sys_flag)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 查询全部菜单 用户菜单列表展示 HttpServletRequest request,
	 * @param request
	 * @param menuListParam
	 * @return
	 * @throws MenuNotFoundException
	 * @throws RoleNotFoundException
	 */
	public List<MenuResultList> findMenuList(HttpServletRequest request,MenuListParam menuListParam)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 查询全部菜单 用户菜单列表展示的统计条数
	 * @param request
	 * @param menuListParam
	 * @return
	 * @throws MenuNotFoundException
	 * @throws RoleNotFoundException
	 */
	public String countMenuList(HttpServletRequest request,MenuListParam menuListParam)throws MenuNotFoundException,RoleNotFoundException;
	
	/**
	 * 20180614查询用户菜单和用户信息
	 * @param request
	 * @param sys_flag
	 * @return
	 * @throws MenuNotFoundException
	 * @throws RoleNotFoundException
	 */
	public List<Object> findMenuAndUserInfo(HttpServletRequest request,String sys_flag)throws MenuNotFoundException,RoleNotFoundException;
}
